<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />

        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/style.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
        
        
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>

<!-- Header -->
<div id="header">
<div class="fixed clear">
    <div id="header_top" class="clear">
        <span id="description">Làm theo đầu việc</span>
        
        <div id="search">
			<form method="get" action="index.php">
				<input name="search" type="text" placeholder="Search" size="50" />
			</form>
        </div>
   
        <div id="login">
            <?php  if (Yii::app()->user->isGuest){
                echo "<a href='index.php?r=users/create'>SignUp</a>"; 
                echo "<a href=''onclick='$(&quot;#userloginwidget&quot;).dialog(&quot;open&quot;); return false;'>Login</a>";   
            }else{ ?>
                <a href="index.php?r=site/logout">Logout</a>
                <a href="#"><?php echo Yii::app()->user->name; ?></a>
             <?php 
               } 
             ?>
            <div class="seps_01"></div>
            <a href="http://www.facebook.com/"><img src="images/fb_login.jpg" /></a>
            <?php $this->widget('UserLoginWidget',array('visible'=>Yii::app()->user->isGuest));  ?>
        </div>
    </div>
    <div id="header_main" class="clear">
        <div id="logo" title="FreeLancers"></div>
        <div id="navbar">
            <ul>
                <li><a href="index.php">Trang chủ</a></li>
                <li><a href="">Tìm việc làm</a></li>
                <li><a href="index.php?r=userprofiles/create">Tạo Hồ sơ</a></li>
                <li><a href="index.php?r=job/create">Tạo việc làm</a></li>
				<li><a href="index.php?r=site/page&view=about">Hỗ trợ</a></li>
            </ul>
        </div>
		<?php if (!Yii::app()->user->isGuest) {
			$getID = UserProfiles::model()->FindByAttributes(array('user_id'=>Yii::app()->user->id));
		?>
		<div id="sub_navbar">
            <ul>
                <li><a href="index.php?r=users/temp1&id=<?php echo Yii::app()->user->id;?>">Dashboard</a></li>
                <li><a href="index.php?r=userProfiles/view&id=<?php echo $getID->id; ?>">Profiles</a></li>
                <li><a href="">Payments</a></li>
                <li><a href="">Contact</a></li>
                <li><a href="">Exam</a></li>
            </ul>
        </div>
		<?php } ?>
    </div>
	<?php if(!isset($_GET['r']) || isset($_GET['r']) && $_GET['r']=='site') { ?>
	<table id="job_steps" width="100%">
        <tr>
            <td width="60%">
				<div id="steps">
					<span>How It Works - 5 Easy Steps</span>
						<ul id="top-steps-menu">
						<li class="top-steps-01"><a href="index.php?r=site/page&view=about"><img alt="Step 01" src="images/icons/step_01.png"><br /><span>Step 01</span></a><br></li>
						<li class="steps_sep"></li>
						<li class="top-steps-02"><a href=""><img alt="Step 02" src="images/icons/step_02.png"><br /><span>Step 02</span></a></li>
						<li class="steps_sep"></li>
						<li class="top-steps-03"><a href=""><img alt="Step 03" src="images/icons/step_03.png"><br /><span>Step 03</span></a></li>
						<li class="steps_sep"></li>
						<li class="top-steps-04"><a href=""><img alt="Step 04" src="images/icons/step_04.png"><br /><span>Step 04</span></a></li>
						<li class="steps_sep"></li>
						<li class="top-steps-05"><a href=""><img alt="Step 05" src="images/icons/step_05.png"><br /><span>Step 05</span></a></li>
						</ul>
			   </div>
            </td>
			<?php $this->widget('application.components.Job.HotJob'); ?>
        </tr>
        <tr>
            <td id="job_create">
        <a href="index.php?r=job/create" class="is_button">Tạo việc làm</a>
            </td>
        </tr>
   </table>
   <?php } ?>
	
	<!--Cai nay de trong da -->
</div>
</div>
<!-- End header -->

<!-- Content -->

<?php echo $content; ?>
<!-- End content -->

<!-- Footer -->
</br></br>
<div id="footer" class="fixed">
    <div class="col_footer">
        <span>Company</span>
        <ul>
            <li><a href="">Home</a></li>
            <li><a href="">About Us</a></li>
            <li><a href="">Services</a></li>
            <li><a href="">Products</a></li>
            <li><a href="">Contact Us</a></li>
        </ul>
    </div>
    <div class="col_footer">
        <span>Company</span>
        <ul>
            <li><a href="">Home</a></li>
            <li><a href="">About Us</a></li>
            <li><a href="">Services</a></li>
            <li><a href="">Products</a></li>
            <li><a href="">Contact Us</a></li>
        </ul>
    </div>
    <div class="col_footer">
        <span>Company</span>
        <ul>
            <li><a href="">Home</a></li>
            <li><a href="">About Us</a></li>
            <li><a href="">Services</a></li>
            <li><a href="">Products</a></li>
            <li><a href="">Contact Us</a></li>
        </ul>
    </div>
    <div class="col_footer">
        <span>Connect with Us</span>
        <ul>
            <li><a href=""><img src="images/icons/fb.png" />FaceBook</a></li>
            <li><a href=""><img src="images/icons/tw.png" />Twitter</a></li>
            <li><a href=""><img src="images/icons/fc.png" />Faces</a></li>
            <li><a href=""><img src="images/icons/rss.png" />Feed RSS</a></li>
        </ul>
    </div>
    <p class="clear"></p>
    
</div>
<!-- End footer -->
<div id="statistic" class="fixed">
    <div class="col_statistic">
    <span class="statistic_num">654,215</span>
    <span class="statistic_description">users online</span>
    </div>
    <div class="col_statistic">
    <span class="statistic_num">1,452,215</span>
    <span class="statistic_description">freelancers</span>
    </div>
    <div class="col_statistic">
    <span class="statistic_num">3,356,129</span>
    <span class="statistic_description">projects posted</span>
    </div>
</div>
<div id="copyright" class="fixed"><p>Allright Reserve @ D&D Group 2012</p></div>

</body>
</html>